# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-nltk
_pkgorig=nltk
pkgver=3.8.2
pkgrel=0
pkgdesc="Natural Language Toolkit"
url="https://github.com/nltk/nltk"
arch="noarch"
license="Apache-2.0"
depends="python3 py3-yaml py3-click py3-regex"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-nose py3-requests"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/nltk/nltk/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pkgorig-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

# tests require nltk-data; use smoke test for now
check() {
	PYTHONPATH=build/lib python3 -c "from nltk import *"
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl

	rm -r "$pkgdir"/usr/lib/python3.*/site-packages/nltk/test
}

sha512sums="
cdd76d1185aa7a0c4e96af19e311120ac70f425e75cd52e37d20d32f2722490c4e74535c44113da5856fb682530ea598446f998fda4e186c898cd675064dee6b  py3-nltk-3.8.2.tar.gz
"
